//  ========== 
//  = 我的_点点安盈_回款计划 业务JS = 
//  ==========
var str;
var Main = function(){
	mui.init({
		swipeBack:true 		//启用右滑关闭功能
	});
	this.init();
	this.loadData();
};
Main.prototype = {
	init : function(){
		mui('.mui-scroll-wrapper').scroll({
					indicators: true //是否显示滚动条
		});
		var _this = this;
		_this.eventInit()
		
	},
	eventInit : function(){//绑定事件
		var _this = this;
        
	},
   _getFundTypeName:function(fundType){
   	
   },
	//内容列表
	loadData : function(_callback){
		var _this = this;
		str = Util.requestURL('str');
		var param = {
				isMobile:1,
				memberId:Util.getLoginUser().memberId,
				str:str
				};
		var url = server_url+'/user/paymentplanBpCustMember.do';
		$.getJSON(url,param  ,function(retData){
			var _html = '';
			if(retData.success){
	           for(var i=0;i<retData.result.length;i++){
	            	var item = retData.result[i];
					_html += '\n <li class="mui-table-view-cell ">';
		            _html += '\n <h5>期数:第'+item.payintentPeriod+'期</h5>';
		            _html += '\n <h5>计划到账日:'+Util.time.formatDate(new Date(item.intentDate),'yyyy-MM-dd')+'</h5>';
		            _html += '\n <h5>应收合计:¥'+item.compensationMoney+'</h5>';
		            var status = '未回款';
		            if(item.factDate){
		            	status = '已回款';
		            }
		            _html += '\n <h5>状态:'+status+'</h5>';
				    _html += '\n </li>';
				}	
            }
             $('.m-item-list').append(_html);
             
             if($.isFunction(_callback)){
             	_callback();
             }
		});
	}
	
}
